package com.sixiaojie.flink.domain;

import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Entity
public class Orders {
    /** 订单ID */
    @Id
    private String id;

    /** 用户ID */
    private Long userId;

    /** 商品ID */
    private Long productId;

    /** 购买数量 */
    private Integer quantity;

    /** 订单金额 */
    private BigDecimal amount;

    /** 订单状态：CREATED,PAID,SHIPPED,DELIVERED,CANCELLED,REFUNDED */
    private String status;

    /** 创建时间 */
    private Date createdAt = new Date();

    /** 最后更新时间 */
    private Date updatedAt = new Date();
}